from datetime import datetime, timedelta
import requests, json, configparser, os, time
from apscheduler.schedulers.blocking import BlockingScheduler
import weixin


def get_alany():
    print('正在分析数据中。。。')
    start = datetime.now()
    # url = 'http://47.113.124.50:8080/analyse/'
    url = 'http://127.0.0.1:8080/analyse/'
    r = requests.get(url)
    end = datetime.now()
    print(r.text)
    print('耗时%s秒' % (end - start).seconds)


if __name__ == '__main__':
    scheduler = BlockingScheduler()
    scheduler.add_job(get_alany, 'interval', seconds=15)
    scheduler.start()
